import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
	{
		path: '',
		redirect: '/home'
	},
	{
		path: '/home',
		name: 'home',
		component: ()=>import("../views/home/home.vue")
	},
	{
		path: '/menu',
		name: 'menu',
		component: ()=>import("../views/menu/menu.vue")
	},
	{
		path: '/cart',
		name: 'cart',
		component: ()=>import("../views/cart/cart.vue")
	},
	{
		path: '/my',
		name: 'my',
		component: ()=>import("../views/my/my.vue")
	},
	{//收货地址
		path: '/addressc',
		name: 'addressc',
		component: ()=>import("../views/my/other/addressc.vue")
	},
	{//新增地址
		path: '/newaddress',
		name: 'newaddress',
		component: ()=>import("../views/my/other/newaddress.vue")
	},
	{//优惠券
		path: '/coupon',
		name: 'coupon',
		component: ()=>import("../views/my/other/coupon.vue")
	},
	{//帮助与反馈
		path: '/help',
		name: 'help',
		component: ()=>import("../views/my/other/help.vue")
	},
	{//平台须知
		path: '/notice',
		name: 'notice',
		component: ()=>import("../views/my/other/notice.vue")
	},
	{//推荐有礼
		path: '/recommend',
		name: 'recommend',
		component: ()=>import("../views/my/other/recommend.vue")
	},
	{//设置
		path: '/setup',
		name: 'setup',
		component: ()=>import("../views/my/other/setup/setup.vue")
	},
	{//个人信息
		path: '/personal',
		name: 'personal',
		component: ()=>import("../views/my/other/setup/personal.vue")
	},
	{//账号与安全
		path: '/security',
		name: 'security',
		component: ()=>import("../views/my/other/setup/security.vue")
	},
	{//支付设置
		path: '/payment',
		name: 'payment',
		component: ()=>import("../views/my/other/setup/payment.vue")
	},
	{//全部订单
		path: '/order',
		name: 'order',
		component: ()=>import("../views/my/order/order.vue")
	}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
